package c1704;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class I {
    public static void main(String[] args) {
        int[] f = new int[31];
        f[0] = 0;
        f[3] = 1;
        int num = 1;
        QuickInput cin = new QuickInput();
        int n = cin.nextInt();
        for (int a = 4; a <= n; a++) {
            f[a] = 2 * f[a - 1] + num - f[a - 4];
            num = num << 1;
        }
        System.out.println(f[n]);

    }

    static class QuickInput {
        BufferedReader buf;
        StringTokenizer tok;

        QuickInput() {
            buf = new BufferedReader(new InputStreamReader(System.in));
        }

        boolean hasNext() {
            while (tok == null || !tok.hasMoreElements()) {
                try {
                    tok = new StringTokenizer(buf.readLine());
                } catch (Exception e) {
                    return false;
                }
            }
            return true;
        }

        String next() {
            if (hasNext()) return tok.nextToken();
            return null;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

}
